<!DOCTYPE html>
<html lang="zh-cn">
	<head>
	  	<title>欢迎</title>
	  	<meta charset="UTF-8"> 
	  	<link rel="stylesheet" type="text/css" href="/web/css/sidebar.css" />
		<link rel="stylesheet" type="text/css" href="/web/css/pure-min.css" />
	</head>
	<body>
	<!--content begin-->
		<div class="header" align="center">
			<h2>首页</h2>
			<hr>
		</div>
		<div class="pure-g">
		    <div class="pure-u-1-2"  align="left"> 
				食物：<br>
				<p>
				{{range .DMAP}}
				<a href="/food/daylog?date={{.Date}}">日期: [{{.Date}}]</a>评语：{{.Comment}} <br>
				{{end}}
				</p>
			</div>
			
		    <div class="pure-u-1-2"  align="left">
				健康：<br>
				<p>
				{{range .HMAP}}
				<a href="/health/daylog?date={{.Date}}">日期 : [{{.Date}}]</a>评语：{{.Comment}} <br>
				{{end}}
				</p>
				体重曲线R代码：<br>
				{{.D}} <br>
				{{.W1}}<br>
				{{.W2}}<br>
				plot(c(1:{{.Cnt}}),weight1,type="b",pch=15,lty=1,col="red",xaxt="n",xlab = "date")<br>
				lines(c(1:{{.Cnt}}),weight2,type="b",pch=17,lty=2,col="blue")<br>
				legend("topleft",inset=.05,title="体重曲线",c("睡前","醒后"),lty=c(1,2),pch=c(15,17),col=c("red","blue"))<br>
				axis(1, c(1:{{.Cnt}}),date)<br>

				<br>
			</div>
		</div>
	<!--content end-->
		<div class="nav">
			<div class="home">
			  <span>RAW</span>
			</div>
			<div class="sidebar">
				<ul>
					<li onclick="window.location.href='/'">Home</li>
					<li class="devider"></li>
					<li onclick="window.location.href='/food'">食物日志</li>
					<li class="devider"></li>
					<li onclick="window.location.href='/health'">健康日志</li>
				</ul>
			</div>
		</div>
	</body>
</html>